#include "../source/server.hpp"

int main()
{
    Socket client_sock;
    client_sock.CreateClient(8080, "127.0.0.1");

    for(int i = 0; i < 5; i++) {
        std::string str = "hello server"; 
        client_sock.Send(str.c_str(), str.size());

        char buf[1024];
        int ret = client_sock.Recv(buf, 1023);
        if(ret <= 0) return 0;

        LOG(LogLevel::INFO) << buf;
        sleep(1);
    }

    while(true) {
        sleep(1);
    }

    client_sock.Close();

    return 0;
}